<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html>
<html>
<head>
<%@ include file="/common/links.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
	$(document).ready(function() {
		$('#submit').click(function() {
			try{
			var subResult = $('#userForm').ajaxSubmit(formOptions);
			return false;
			}catch(e){
				alert(e.message);
			}
		})
		$('#cancel').click(function() {
			closePopUpForm();
		})
		$("button").button();
		//$( "#demoEntity_dateField" ).datepicker(datePickerOptions);//TODO here init date field datepicker bind
		 jQuery("#userForm").validationEngine({promptPosition : "centerRight"});
	});

</script>
</head>
<body>
	<fieldset>
		<legend>
			<c:if test="${editType==1}">
				<s:text name="userNew.title" />
			</c:if>
			<c:if test="${editType==2}">
				<s:text name="userEdit.title" />
			</c:if>
		</legend>
		<s:form id="userForm" action="saveUser" theme="xhtml" validate="false">
			<s:hidden name="gridId"/>
			<s:hidden name="editType"/>
			<s:hidden key="model.id"/>
			<s:checkbox id="user_accountNonExpired" key="user.accountNonExpired" name="model.accountNonExpired" />
			<s:checkbox id="user_accountNonLocked" key="user.accountNonLocked" name="model.accountNonLocked" />
			<s:checkbox id="user_credentialsNonExpired" key="user.credentialsNonExpired" name="model.credentialsNonExpired" />
			<s:checkbox id="user_enabled" key="user.enabled" name="model.enabled" />
			<s:textfield id="user_password" key="user.password" name="model.password" required="true" cssClass="validate[required]"/>
			<s:textfield id="user_username" key="user.username" name="model.username" required="true" cssClass="validate[required]"/>
		</s:form>
		<button name="submit" type="button" id="submit">
			<s:text name="button.save" />
		</button>
		<button name="cancel" type="button" id="cancel">
			<s:text name="button.cancel" />
		</button>
	</fieldset>
</body>
</html>





















